#!/usr/bin/env python
# -*- coding: utf-8 -*-

__author__ = 'dong'

from bs4 import BeautifulSoup

with open('20160723210115.html', 'r') as fd:
    s = fd.read()
    soup = BeautifulSoup(s, 'html.parser')
    print soup.p.string
    print isinstance(soup.p.string.encode('utf-8'), str)
    if soup.p.string.encode('utf-8') == '恭喜您，发布聘证成功！':
        print '----'
    # print isinstance(str(soup.p.string), str)
    # print str(soup.p.string).decode('utf-8')